Skip to content

Add main runnables with stack/cabal auto-detection - #40

Merged
MrSubidubi merged 4 commits into
zed-extensions:mainfrom
sectore:runnables-main
Jul 20, 2026
Merged

Add main runnables with stack/cabal auto-detection#40
MrSubidubi merged 4 commits into
zed-extensions:mainfrom
sectore:runnables-main

Conversation

@sectore

@sectore sectore commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Example (screenshot)

Run/Build buttons in the gutter. Result of the Build task in the terminal.

he-zed-task-example

Notes

  • Stack or Cabal will be auto-detected in default tasks (can be overridden in Zed's global or project settings)
  • Tests added for auto-detection of Stack or Cabal
  • In some (rare) cases a false positive might occur if other places in code uses another main function (e.g. in tests). It's fine to ignore it for now.
  • Bump zed_extension_api = "0.7.0" (to stay with latest version, similar to other open PRs)

Acknowledge

Closes #38

@MrSubidubi

Copy link
Copy Markdown
Contributor

Happy to take a look once you rebased/merged onto main after the other PR

@MrSubidubi MrSubidubi changed the title feat: main runnables, Stack/Cabal auto-detected Addmain runnables with stack/cabal auto-detection Jul 20, 2026
@MrSubidubi MrSubidubi changed the title Addmain runnables with stack/cabal auto-detection Add main runnables with stack/cabal auto-detection Jul 20, 2026

@MrSubidubi MrSubidubi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Danke!

@MrSubidubi
MrSubidubi enabled auto-merge (squash) July 20, 2026 17:36
@MrSubidubi
MrSubidubi disabled auto-merge July 20, 2026 17:38
@MrSubidubi
MrSubidubi merged commit a92b526 into zed-extensions:main Jul 20, 2026
5 checks passed
@sectore
sectore deleted the runnables-main branch July 20, 2026 18:44
MrSubidubi pushed a commit that referenced this pull request Jul 23, 2026
_In some parts this PR is very similar to #40. It's recommended to
check/merge #40 before._

Supports [`Hspec`](https://hspec.github.io),
[`sydtest`](https://github.com/NorfairKing/sydtest) and _maybe_ other
[`RSpec`](https://rspec.info/)-like test frameworks to run `describe` /
`it` test groups and examples.

Stack/Cabal auto-detection included to run tests. 

## Example (screenshot)

Run test buttons for `describe` / `it` blocks in the gutter. Result of
the test task in the terminal.

<img width="787" height="688" alt="hs-extension-bbd-test"
src="https://github.com/user-attachments/assets/0cb574a3-547b-499d-8580-1c56c202425f"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add native Run button support

2 participants